/* Academic Website Styles */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Merriweather", Georgia, "Times New Roman", Times, serif;
  line-height: 1.75;
  color: #333; /* 定义所有文本颜色 （0=#333）*/
  background-color: #fffefcf2; /* 定义背景颜色 （0=#fafafa）*/
}

/* 导航栏styles */
.navbar {
  background-color: #ffffff; /* 定义导航栏颜色 （0=#fff）*/
  box-shadow: 0 2px 10px rgba(175, 156, 156, 0.1);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.nav-logo a {
  /* Yuyan styles */
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-logo a:hover {
  color: #3498db;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: #555;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: #3498db;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: #3498db;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 250px;
  height: 3px;
  background-color: #333;
  margin: 300px 0;
  transition: 0.3s;
}

.school-container {
  text-align: center;
  padding: 15px 15px 15px;
  background-color: #979793; /* 定义section3背景颜色 （0=#f5f5f5）*/
  border-bottom: 1px solid #ddd;
}

.school-content p {
  margin: 1px 0;
  font-size: 0.8rem;
  color: #ddd; /* 定义section3字体颜色 （0=#333）*/
  font-weight: 10;
}

/* 主题style (photo left, text right) */
.intro-section {
  /* 定义边距 */
  max-width: 950px;
  max-height: 900px;
  margin: 120px auto 0;
  padding: 32px 24px;
}

.intro-wrapper {
  display: flex;
  gap: 80px; /* 图片与文本的间距 */
  align-items: flex-start;
}
/* 调整图片 */
.intro-photo {
  flex: 0 0 240px;
}

.intro-photo img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}

.label {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
  padding: 15px 0;
  border-top: 1px solid #e0e0e0;
}

.social-link,
.label-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #333;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.social-link:hover {
  color: #3498db;
}

.label-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  filter: grayscale(100%); /* 默认灰色图标 */
}

.label span {
  white-space: nowrap;
}

/* 调整文本 */
.intro-text {
  flex: 10;
  max-width: 1000px;
  font-size: 16px;
  line-height: 1.8;
}

.intro-text h1 {
  margin: 2px 0 10px;
  font-size: 22px; /* welcome 字体（优化）*/
  letter-spacing: 0.2px;
  font-weight: 600;
}

.intro-text p.main {
  text-align: justify; /* 两端对齐（待调整）*/
}

.intro-text p {
  margin: 0 0 10px;
}

.yanyu_intro {
  margin-top: 10px;
  text-align: justify; /* 两端对齐（待调整）*/
  font-size: 15px;
  line-height: 1.75;
  color: #444; /* 定义简介字体颜色 （0=#555）*/
}

/* Profile Photo */
.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: slideInRight 1s ease-out 0.3s both;
}

.profile-photo {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
  border: 4px solid rgba(255, 255, 255, 0.3);
}

.profile-photo::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.profile-photo:hover::before {
  animation: shimmer 1.5s ease-in-out;
}

.profile-photo:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

.profile-photo img {
  width: 100%;
  height: 25%;
  object-fit: contain;
  display: block;
  transition: transform 0.4s ease;
  background-color: rgba(255, 255, 255, 0.1);
  opacity: 0;
  animation: fadeIn 1s ease-in-out forwards;
}

.profile-photo:hover img {
  transform: scale(1.1);
}

/* About Section */
.about {
  padding: 6rem 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  position: relative;
}

.about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #667eea, transparent);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  font-size: 2.8rem;
  font-weight: 600;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  animation: fadeInUp 1s ease-out;
}

.section-title::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
  animation: expandLine 1.5s ease-out 0.5s both;
}

.about-text {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.9;
  color: #444;
}

.about-text p {
  margin-bottom: 2rem;
  text-align: justify;
  position: relative;
  padding-left: 2rem;
}

.about-text p::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0.2rem;
  color: #667eea;
  font-size: 1.2rem;
  font-weight: bold;
}

/* Animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
    opacity: 0;
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes expandLine {
  from {
    width: 0;
  }
  to {
    width: 80px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: #fff;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero .subtitle {
    font-size: 1.2rem;
  }

  .profile-photo {
    width: 180px;
    height: 180px;
  }

  .section-title {
    font-size: 2rem;
  }

  .nav-container {
    padding: 1rem;
  }

  .container {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero .subtitle {
    font-size: 1.1rem;
  }

  .hero .institution {
    font-size: 1rem;
  }

  .profile-photo {
    width: 150px;
    height: 150px;
  }

  .section-title {
    font-size: 2rem;
  }

  .about-text {
    font-size: 1rem;
  }

  .about-text p {
    padding-left: 1.5rem;
  }

  .about-text p:last-child {
    padding: 1rem 1.5rem 1rem 2.5rem;
  }

  .label {
    gap: 12px;
    margin-top: 12px;
    padding: 10px 0;
  }

  .social-link,
  .label-item {
    font-size: 0.8rem;
  }

  .label-icon {
    width: 16px;
    height: 16px;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Intro Section responsive tweaks */
@media (max-width: 1024px) {
  .intro-section {
    padding: 24px 20px;
  }
  .intro-wrapper {
    gap: 24px;
  }
  .intro-text {
    font-size: 13.5px;
  }
  .intro-text h1 {
    font-size: 16px;
  }
}

@media (max-width: 800px) {
  .intro-wrapper {
    flex-direction: column;
    align-items: center;
  }
  .intro-photo {
    width: 60%;
    max-width: 360px;
  }
  .intro-text {
    max-width: 620px;
    font-size: 13px;
  }

  .label {
    gap: 15px;
    margin-top: 15px;
    padding: 12px 0;
  }

  .social-link,
  .label-item {
    font-size: 0.85rem;
  }

  .label-icon {
    width: 18px;
    height: 18px;
  }
}

/* Research Section Styles */
.research-section {
  margin-top: 40px;
  padding: 2rem 0;
  background: #ffffff;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.research-section h1 {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 2rem;
  text-align: left;
}

.work-in-progress {
  margin-top: 40px;
  padding: 2rem 0;
  background: #ffffff;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.paper {
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.paper h2 {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-align: left;
}

.paper h2 a {
  color: #0066cc;
  text-decoration: underline;
}

.paper h2 a:hover {
  color: #004499;
}

.authors {
  color: #666;
  margin-bottom: 0.3rem;
  text-align: left;
}

.status {
  color: #666;
  font-style: italic;
  margin-bottom: 1rem;
  text-align: left;
}

.abstract {
  /*  text-indent: 2rem;*/
  line-height: 1.6;
  color: #333;
  margin-bottom: 1rem;
  text-align: justify;
}

.presentations {
  line-height: 1.6;
  color: #333;
  text-align: justify;
  /*  text-indent: 2rem;*/
}

/* Responsive Design for Research */
@media (max-width: 768px) {
  .research-section {
    padding: 1rem 0;
    margin-top: 20px;
    max-width: 95%;
  }

  .research-section h1 {
    font-size: 1.8rem;
  }

  .paper {
    padding: 0 0.5rem;
  }

  .paper h2 {
    font-size: 1.1rem;
  }

  .abstract,
  .presentations {
    text-indent: 1rem;
  }
}

/* Focus styles for accessibility */
.nav-link:focus,
.nav-logo a:focus {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}
